import request from '../utils/request';


// 
// 局域网环境地址
// export const BASE_API = 'http://www.9g.com'//假的，phpstudy
// 线上地址
export const BASE_API = 'http://45.125.45.110:10010/'


export const fetchData = () => {
    return request({
        url: './table.json',
        method: 'get'
    });
};

export const testData = (data: any) => {
    return request({
        url: BASE_API+'/api/index/index',
        method: 'post',
        data,
    });
};
// admin增删改查
export const adminbData = (data: any) => {
    return request({
        url: BASE_API+'/api/admin/admin/gindex',
        method: 'post',
        data,
    });
};

export function roleInsert(data: any) {
    return request({
        url: BASE_API+'/api/admin/admin/gindex',
        method: 'post',
        data
    });
}
export function roleUpdate(data: any) {
    return request({
        url: BASE_API+'/api/admin/admin/gindex',
        method: 'post',
        data
    });
}
// 系统树
export function menuAll(data: any) {
    return request({
        url: BASE_API+'/admin/auth/admin/gindex',
        method: 'post',
        data
    });
}
// 系统树
export function menuRole(data: any) {
    return request({
        url: BASE_API+'/admin/auth/admin/gindex',
        method: 'post',
        data
    });
}

// 图片上传
export function uploadImg(data: any) {
    return request({
        url: BASE_API+'/api/Common/upload',
        method: 'post',
        data
    });
}


// 套餐 增删改查
export const goodsData = (data: any) => {
    return request({
        url: BASE_API+'/api/admin/goods/gindex',
        method: 'post',
        data,
    });
};

// 用户 增删改查
export const userData = (data: any) => {
    return request({
        url: BASE_API+'/api/admin/user/gindex',
        method: 'post',
        data,
    });
};
// 用户微信 增删改查
export const userwxData = (data: any) => {
    return request({
        url: BASE_API+'/api/admin/userwx/gindex',
        method: 'post',
        data,
    });
};
//微信支付配 置 增删改查
export const htconfigData = (data: any) => {
    return request({
        url: BASE_API+'/api/admin/htconfig/gindex',
        method: 'post',
        data,
    });
};
//支付宝配 置 增删改查
export const htconfigzfbData = (data: any) => {
    return request({
        url: BASE_API+'/api/admin/htconfigzfb/gindex',
        method: 'post',
        data,
    });
};
//订单列表 增删改查
export const orderData = (data: any) => {
    return request({
        url: BASE_API+'/api/admin/order/gindex',
        method: 'post',
        data,
    });
};
//角色组 增删改查
export const adminGroupSearch = (data: any) => {
    return request({
        url: BASE_API+'/api/admin/admingroup/gindex',
        method: 'post',
        data,
    });
};
//角色组 增删改查
export const admingroupdata = (data: any) => {
    return request({
        url: BASE_API+'/api/admin/admingroup/gindex',
        method: 'post',
        data,
    });
};

//软件列表 增删改查
export const softwaredata = (data: any) => {
    return request({
        url: BASE_API+'/api/admin/software/gindex',
        method: 'post',
        data,
    });
};
//试用记录
export const logtrydata = (data: any) => {
    return request({
        url: BASE_API+'/api/admin/logtry/gindex',
        method: 'post',
        data,
    });
};
//在线列表
export const logonlinedata = (data: any) => {
    return request({
        url: BASE_API+'/api/admin/logonline/gindex',
        method: 'post',
        data,
    });
};
//卡种列表
export const carddata = (data: any) => {
    return request({
        url: BASE_API+'/api/admin/card/gindex',
        method: 'post',
        data,
    });
};
//充值卡表
export const cardrefilldata = (data: any) => {
    return request({
        url: BASE_API+'/api/admin/cardrefill/gindex',
        method: 'post',
        data,
    });
};
// //充值记录
// export const logcardrefilldata = (data: any) => {
//     return request({
//         url: BASE_API+'/api/admin/logcardrefill/gindex',
//         method: 'post',
//         data,
//     });
// };
//黑名单表
export const blacklistdata = (data: any) => {
    return request({
        url: BASE_API+'/api/admin/blacklist/gindex',
        method: 'post',
        data,
    });
};
//防火墙表
export const firewalldata = (data: any) => {
    return request({
        url: BASE_API+'/api/admin/firewall/gindex',
        method: 'post',
        data,
    });
};
//邮箱
export const xtemaildata = (data: any) => {
    return request({
        url: BASE_API+'/api/admin/xtemail/gindex',
        method: 'post',
        data,
    });
};
//短信
export const xtsmsdata = (data: any) => {
    return request({
        url: BASE_API+'/api/admin/xtsms/gindex',
        method: 'post',
        data,
    });
};


// //dd管理员 增删改查
export const ddadmindata = (data: any) => {
    return request({
        url: BASE_API+'/api/admin/ddadmin/gindex',
        method: 'post',
        data,
    });
};


// //dd文章 增删改查
export const ddarchivesdata = (data: any) => {
    return request({
        url: BASE_API+'/api/admin/ddarchives/gindex',
        method: 'post',
        data,
    });
};